//管理所有的请求接口



import service from "./request";
//登陆接口
export const login = (data)=>{
    return service({
        method:'post',
        url:'/login',
        data
    })
}
//左侧边框接口(获取token权限应有的列表)
export const GetMenus = ()=>{
    return service({
        method:'get',
        url:'/menus',
    })
}
//获取列表的接口(获取users的数据)
export const GetUsers = (params)=>{
    return service({
        method:'get',
        url:'/users',
        params
    })
}
//添加用户的接口
export const AddUsers = (data)=>{
    return service({
        method:'post',
        url:'/users',
        data
    })
}
//修改数据接口
export const GetOneUsers = (params)=>{
    return service({
        method:'get',
        url:'/users/'+params,
        
    })
}

//修改用户
export const EditUsers = (data)=>{
    return service({
        method:'put',
        url:'/users/'+data.id,
        data
    })
}

//删除留言
export const DelOenUsers = (params)=>{
    return service({
        method:'delete',
        url:'/users/'+params,
    })
}

